﻿<controls:ChildWindow x:Class="ITSSP.Views.UserList.PasswordUserWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:dataForm="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="400" Height="180"
           Title="Update User Password">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <dataForm:DataForm x:Name="dataForm1" AutoGenerateFields="False" AutoCommit="True" AutoEdit="True" CommandButtonsVisibility="None">
            <dataForm:DataForm.EditTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Vertical">
                        <dataForm:DataField Label="Password">
                            <PasswordBox Password="{Binding Password, Mode=TwoWay,NotifyOnValidationError=True,  ValidatesOnExceptions=True }" />
                        </dataForm:DataField>
                        <dataForm:DataField Label="Password Confirmation">
                            <PasswordBox Password="{Binding PasswordConfirmation, Mode=TwoWay,NotifyOnValidationError=True,  ValidatesOnExceptions=True }" />
                        </dataForm:DataField>
                    </StackPanel>
                </DataTemplate>                
            </dataForm:DataForm.EditTemplate>
        </dataForm:DataForm>

        <Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />
        <Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="1" />
    </Grid>
</controls:ChildWindow>